package logicsv.login_logicsv;

import javaRMI.RMIClient;

import logic.login_logic.Login;
import resultmessage.LoginRM;


public class LoginLogicController implements LoginLogicsv {
	private RMIClient rmi;
	private Login logger;
	public LoginLogicController(RMIClient rmi){
		this.rmi = rmi;
	}
	@Override
	public LoginRM login(String id, String pwd) {
		logger = new Login(rmi);
		return logger.login(id, pwd);
	}

	@Override
	public UserType getUserType(String id) {
		// TODO Auto-generated method stub
		if(logger != null){
			return logger.getUserType(id);
		}
		throw new NullPointerException("logger is null");
	}

}
